home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 November / Chip Kasım 2000.iso / prog / basic / 09 / AXA2.CAB / DAJAVA.CAB / com / ms / dxmedia / Preferences.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-10-14  |  2.8 KB  |  108 lines

  1. package com.ms.dxmedia;
  2.  
  3. import com.ms.com.ComFailException;
  4. import com.ms.com.Variant;
  5. import com.ms.dxmedia.rawcom.IDAPreferences;
  6.  
  7. public class Preferences {
  8.    public static final String RGB_LIGHTING_MODE = "RGB Lighting";
  9.    public static final String FILL_MODE = "Fill Mode";
  10.    public static final int FILL_MODE_SOLID = 0;
  11.    public static final int FILL_MODE_WIREFRAME = 1;
  12.    public static final int FILL_MODE_POINT = 2;
  13.    public static final String TEXTURE_QUALITY = "Texture Quality";
  14.    public static final int TEXTURE_QUALITY_NEAREST = 0;
  15.    public static final int TEXTURE_QUALITY_LINEAR = 1;
  16.    public static final String SHADE_MODE = "Shade Mode";
  17.    public static final int SHADE_MODE_FLAT = 0;
  18.    public static final int SHADE_MODE_GOURAUD = 1;
  19.    public static final int SHADE_MODE_PHONG = 2;
  20.    public static final String DITHERING = "Dither Enable";
  21.    public static final String PERSPECTIVE_CORRECT = "Perspective Correct Texturing";
  22.    public static final String USE_3D_HW = "Use 3D Hardware";
  23.    public static final String USE_VIDEOMEM = "Use Video Memory";
  24.    public static final String COLOR_KEY_RED = "ColorKey Red (0-255)";
  25.    public static final String COLOR_KEY_GREEN = "ColorKey Green (0-255)";
  26.    public static final String COLOR_KEY_BLUE = "ColorKey Blue (0-255)";
  27.    public static final String ENGINE_OPTIMIZATIONS = "Optimizations On";
  28.    public static final String MAX_FRAMES_PER_SEC = "Max FPS";
  29.    public static final String OVERRIDE_APPLICATION_PREFERENCES = "Override Application Preferences";
  30.    IDAPreferences _prefs;
  31.  
  32.    public void set(String var1, boolean var2) {
  33.       try {
  34.          this._prefs.PutPreference(var1, new Variant(var2));
  35.       } catch (ComFailException var5) {
  36.          throw StaticsBase.handleError(var5);
  37.       }
  38.    }
  39.  
  40.    public void set(String var1, double var2) {
  41.       try {
  42.          this._prefs.PutPreference(var1, new Variant(var2));
  43.       } catch (ComFailException var6) {
  44.          throw StaticsBase.handleError(var6);
  45.       }
  46.    }
  47.  
  48.    public void set(String var1, int var2) {
  49.       try {
  50.          this._prefs.PutPreference(var1, new Variant(var2));
  51.       } catch (ComFailException var5) {
  52.          throw StaticsBase.handleError(var5);
  53.       }
  54.    }
  55.  
  56.    public void set(String var1, String var2) {
  57.       try {
  58.          this._prefs.PutPreference(var1, new Variant(var2));
  59.       } catch (ComFailException var5) {
  60.          throw StaticsBase.handleError(var5);
  61.       }
  62.    }
  63.  
  64.    public void propagate() {
  65.       try {
  66.          this._prefs.Propagate();
  67.       } catch (ComFailException var3) {
  68.          throw StaticsBase.handleError(var3);
  69.       }
  70.    }
  71.  
  72.    public int getInt(String var1) {
  73.       try {
  74.          return this._prefs.GetPreference(var1).getInt();
  75.       } catch (ComFailException var4) {
  76.          throw StaticsBase.handleError(var4);
  77.       }
  78.    }
  79.  
  80.    public String getString(String var1) {
  81.       try {
  82.          return this._prefs.GetPreference(var1).getString();
  83.       } catch (ComFailException var4) {
  84.          throw StaticsBase.handleError(var4);
  85.       }
  86.    }
  87.  
  88.    Preferences(IDAPreferences var1) {
  89.       this._prefs = var1;
  90.    }
  91.  
  92.    public boolean getBoolean(String var1) {
  93.       try {
  94.          return this._prefs.GetPreference(var1).getBoolean();
  95.       } catch (ComFailException var4) {
  96.          throw StaticsBase.handleError(var4);
  97.       }
  98.    }
  99.  
  100.    public double getDouble(String var1) {
  101.       try {
  102.          return this._prefs.GetPreference(var1).getDouble();
  103.       } catch (ComFailException var4) {
  104.          throw StaticsBase.handleError(var4);
  105.       }
  106.    }
  107. }
  108.